package com.hyst.domain;

import java.math.BigDecimal;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 购买课程记录表实体
 */
@Data
@ApiModel(value = "购买课程记录表", description = "")

public class PurchaseCourse {

	@ApiModelProperty(value = "id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@Id
	@ApiModelProperty(value = "uniqueid")
	private String uniqueid;

	@ApiModelProperty(value = "教材")
	private String material;

	@ApiModelProperty(value = "学生id")
	private String studentId;

	@ApiModelProperty(value = "销售id(负责人)")
	private String sellerId;

	@ApiModelProperty(value = "教师ID")
	private String teacherId;

	@ApiModelProperty(value = "购买时长")
	private Integer hoursEnrolled;

	@ApiModelProperty(value = "剩余时长(暂时保留，也可根据完成时长计算出来)")
	private Integer hoursRemaining;

	@ApiModelProperty(value = "完成时长")
	private Integer lessonsCompleted;

	@ApiModelProperty(value = "状态")
	private Integer state;

	@ApiModelProperty(value = "购买日期")
	private String purchaseDate;
	// @Transient
	// private String purchaseDateaStr;
	@ApiModelProperty(value = "is_delete")
	private Integer isDelete=0;

	@ApiModelProperty(value = "付款方式")
	private String payMethod;

	@ApiModelProperty(value = "活动方式")
	private String eventsWay;

	@ApiModelProperty(value = "课程类型（新报课程、续报课程、补课时）")
	private String type;

	@ApiModelProperty(value = "备注")
	private String remark;

	@ApiModelProperty(value = "购买金额")
	private BigDecimal money;

	@ApiModelProperty(value = "課程級別")
	private String materialLevel;

	@Transient
    private String templPurId;

	// 排序方式
	@Transient
	private String sort = "DESC";

	@Transient
	private int pageNum = 1;

	@Transient
	private int pageSize = Integer.MAX_VALUE;

	//----------------------------------试图
	@Transient
	private String wechat;
	@Transient
	private String zoomId;
	@Transient
	private String tname;
	@Transient
	private String sellName;
	@Transient
	private String stuname;
	@Transient
	private Integer[] times;
	@Transient
	private String startDate;
	// public void setPurchaseDateaStr(final String d) throws ParseException {
	// purchaseDateaStr = d;
	// if (d != null) {
	// final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
	// purchaseDate = dateFormat.parse(d);
	// }
	// }


}
